package com.ytjj.qmyx.admin.service;

import com.ytjj.common.api.CommonPage;
import com.ytjj.qmyx.admin.model.request.ProductSubjectPlateRequest;
import com.ytjj.qmyx.admin.model.request.SubjectsRequest;
import com.ytjj.qmyx.admin.model.response.ProductSubjectPlateResponse;
import com.ytjj.qmyx.admin.model.response.SubjectPlateResponse;
import com.ytjj.qmyx.admin.model.response.SubjectsResponse;
import com.ytjj.qmyx.mall.model.ProductSubjectPlate;
import com.ytjj.qmyx.mall.model.SubjectPlate;

import java.util.Map;

/**
 *
 * 
 * @description:专题相关的业务
 */
public interface SubjectsService {

    /**
    * 添加或修改专题
    * @param subjectsRequest:
    * @returns: boolean
    * 
    */
    boolean addOrEditSubject(SubjectsRequest subjectsRequest);



    /**
    * 分页查询专题
    * @param subjectsRequest:
    * @returns: com.ytjj.common.api.CommonPage<com.ytjj.qmyx.admin.model.response.SubjectsResponse>
    * 
    */
    CommonPage<SubjectsResponse> getSubject(SubjectsRequest subjectsRequest);


    /**
    * 根据专题Id获得板块列表
    * @param subjectId:
    * @returns: com.ytjj.qmyx.admin.model.response.SubjectsResponse
    * 
    */
    CommonPage<SubjectPlateResponse> getPlateBySubjectId(Integer subjectId);


    /**
    * 删除专题
    * @param id:
    * @returns: boolean
    * 
    */
    boolean delSubjectById(Integer id);

    /**
    * 添加商品到
    * @param productSubjectPlate:
    * @returns: int 添加成功的商品Id
    * 
    */
    Map<String,Object> addProduct(ProductSubjectPlate productSubjectPlate);


    /**
    * 分页查询板块下的商品
    * @param productSubjectPlateRequest:
    * @returns: com.ytjj.common.api.CommonPage<com.ytjj.qmyx.admin.model.response.ProductSubjectPlateResponse>
    * 
    */
    CommonPage<ProductSubjectPlateResponse> getProductByPlateId(ProductSubjectPlateRequest productSubjectPlateRequest);
    
    /** 
    * 根据专题Id获得专题详细
    * @param :
    * @returns: com.ytjj.qmyx.admin.model.response.SubjectPlateResponse 
    * 
    */
    SubjectsResponse getSubjectInfo(Integer id);
    
    /** 
    * 根据专题删除板块
    * @param :
    * @returns: boolean 
    * 
    */
    boolean delPlateBySubjectId(Integer subjectId);


    /**
     * 根据板块id移除板块
     * @param :
     * @returns: boolean
     * 
     */
    boolean delPlateById(Integer id);

    /**
    * 移除商品
    * @param id:
    * @returns: boolean
    * 
    */
    boolean delProductById(Integer id);


    /**
    * 获得编辑的商品信息
    * @param id:
    * @returns: com.ytjj.qmyx.admin.model.response.ProductSubjectPlateResponse
    * 
    */
    ProductSubjectPlateResponse getProductEditInfo(Integer id);



}
